package xyz.lxbq.service.impl;

import org.springframework.stereotype.Service;
import xyz.lxbq.mapper.EmpMapper;
import xyz.lxbq.pojo.Emp;
import xyz.lxbq.pojo.EmpStatistics;
import xyz.lxbq.service.EmpService;
import xyz.lxbq.utils.Tongji;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author XuHu
 * @version 1.0
 * @date 2020/10/14 11:21
 */
@Service
public class EmpServiceImpl implements EmpService {

    @Resource
    EmpMapper empMapper;

    @Override
    public Emp login(Emp emp) {
        return empMapper.login(emp);
    }

    @Override
    public int addEmp(Emp emp) {
        return empMapper.addEmp(emp);
    }

    @Override
    public int getEmpNo(String no) {
        return empMapper.getEmpNo(no);
    }

    @Override
    public int getALlEmoCount() {
        return empMapper.getALlEmoCount();
    }

    @Override
    public List<Emp> getEmpPage(int pageStart, int pageSize) {
        return empMapper.getEmpPage(pageStart,pageSize);
    }

    @Override
    public int deleteEmp(int id) {
        return empMapper.deleteEmp(id);
    }

    @Override
    public List<Tongji> getEmpStatistics() {
        return empMapper.getEmpStatistics();
    }

    @Override
    public int updataPassword(String pass, int id) {
        return empMapper.updataPassword(pass, id);
    }

    @Override
    public int updatePhoto(Emp emp) {
        return empMapper.updatePhoto(emp);
    }

}
